<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/9/22
  Time: 16:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>字典明细管理</title>
    <%@include file="/WEB-INF/views/common/link.jsp"%>

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <%@include file="/WEB-INF/views/common/navbar.jsp"%>
    <!--菜单回显-->
    <c:set var="currentMenu" value="systemDictionaryItem"/>
    <%@include file="/WEB-INF/views/common/menu.jsp"%>
    <div class="content-wrapper">
        <section class="content-header">
            <h1>字典明细管理</h1>
        </section>
        <section class="content">
            <div class="box">




                <%--将页面分成左右两份，左边占3分，右边占9份--%>
                <div class="row">

                    <div class=" col-sm-3">

                        <div class="panel panel-info">
                            <div class="panel-heading"><strong>字典目录</strong></div>
                            <ul class="list-group" id="dicDirUl">

                                <c:forEach items="${dics}" var="dic">
                                    <li class="list-group-item"><a class="dicDir" data-pid="${dic.id}" href="/systemDictionaryItem/list.do?parentId=${dic.id}">${dic.title}</a></li>
                                </c:forEach>

                                <script>
                                    $(".dicDir[data-pid='${qo.parentId}']").closest("li").addClass("active");
                                    $(".dicDir[data-pid='${qo.parentId}']").css("color","white")
                                </script>
                            </ul>
                        </div>

                    </div>


                    <div class=" col-sm-9">


                        <c:if test="${!empty result}">

                            <!--高级查询--->
                            <form class="form-inline" id="searchForm" action="/systemDictionaryItem/list.do" method="post">
                                <input type="hidden" name="currentPage" id="currentPage" value="1">

                                <input type="hidden" name="parentId" value="${qo.parentId}">


                                <a href="/systemDictionaryItem/input.do?parentId=${qo.parentId}" class="btn btn-success btn-input" style="margin: 10px">
                                    <span class="glyphicon glyphicon-plus"></span> 添加
                                </a>
                            </form>

                            <!--编写内容-->
                            <div class="box-body table-responsive no-padding ">
                                <table class="table table-hover table-bordered">
                                    <tr>
                                        <th>编号</th>
                                        <th>标题</th>
                                        <th>序号</th>
                                        <th>操作</th>
                                    </tr>
                                    <c:forEach items="${result.list}" var="entity" varStatus="vs">
                                        <tr>
                                            <td>${vs.count}</td>
                                            <td>${entity.title}</td>
                                            <td>${entity.sequence}</td>
                                            <td>
                                                <a class="btn btn-info btn-xs btn-input" href="/systemDictionaryItem/input.do?id=${entity.id}&parentId=${qo.parentId}">
                                                    <span class="glyphicon glyphicon-pencil"></span> 编辑
                                                </a>

                                                <a class="btn btn-danger btn-xs btn-input" href="/systemDictionaryItem/delete.do?id=${entity.id}">
                                                    <span class="glyphicon glyphicon-pencil"></span> 删除
                                                </a>

                                            </td>
                                        </tr>
                                    </c:forEach>
                                </table>
                                <!--分页-->
                                <%@include file="/WEB-INF/views/common/page.jsp"%>
                            </div>

                        </c:if>



                    </div>
                </div>








            </div>
        </section>
    </div>
    <%@include file="/WEB-INF/views/common/footer.jsp"%>
</div>
</body>
</html>
